///*
//* Change Logs:
//* Date           Author       Notes
//* 2022-01-15     chenbin
//*/
//#include "stdint.h"
//#include "stdio.h"
//#include "string.h"
//#include "rtthread.h"
//#include "rtdevice.h"
//
//#define DBG_TAG "slcanapp"
//#define DBG_LVL DBG_LOG
//#include <rtdbg.h>
//
//#include "slcan.h"
//
//extern void slcan_process_task(void *p);
//
//static rt_slcan_t slcan_instance2 = {0};
//
//static rt_err_t slcan_rtcan_rx_call(rt_device_t dev, rt_size_t size)
//{
//    rt_sem_release(&(slcan_instance2.rx_sem));
//    return RT_EOK;
//}
//
//static rt_err_t slcan_rtchar_rx_call(rt_device_t dev, rt_size_t size)
//{
//    rt_sem_release(&(slcan_instance2.rx_sem));
//    return RT_EOK;
//}
//
//
//void slcan2_app_init(void)
//{
//    static int slcan_app_init = 0;
//    rt_thread_t tid;
//    if(slcan_app_init > 0)
//    {
//        return;
//    }
//    slcan_app_init = 1;
//
//    slcan_instance2.candev_name = "can2";
//    slcan_instance2.candev = rt_device_find(slcan_instance2.candev_name);
//    slcan_instance2.candev_rx_call = slcan_rtcan_rx_call;
//    slcan_instance2.candev_oflag = RT_DEVICE_FLAG_INT_TX | RT_DEVICE_FLAG_INT_RX;
//
//    slcan_instance2.chardev_name = "uart3";
//    slcan_instance2.chardev = rt_device_find(slcan_instance2.chardev_name);
//    slcan_instance2.chardev_rx_call = slcan_rtchar_rx_call;
//    slcan_instance2.chardev_oflag = RT_DEVICE_FLAG_INT_RX;
//
//    slcan_instance2.slcan_baud_index = SLCAN_BAUD_500K;
//    slcan_instance2.slcan_mode_index = SLCAN_MODE_NORMAL;
//
//    rt_sem_init(&(slcan_instance2.rx_sem), "rx_sem", 0, RT_IPC_FLAG_FIFO);
//
//    tid = rt_thread_create("slcan1",slcan_process_task, &slcan_instance2,2048,20, 10);
//    if (tid != RT_NULL)
//            rt_thread_startup(tid);
//    return;
//}
//
//
//void slcan2_init(uint8_t argc, char **argv)
//{
//    rt_kprintf("slcan2 init\n");
//    slcan2_app_init();
//}
//MSH_CMD_EXPORT(slcan2_init, slcan2 init);
